-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dumpling: compress supports snappy/zstd #38910
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Is this PR ready for review now? |
there are still 2 tests failing and I am trying to fix them |
/cc @lichunzhu @lance6716 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
dumpling/export/config.go
Outdated
@@ -593,6 +593,10 @@ func ParseCompressType(compressType string) (storage.CompressType, error) { | |||
return storage.NoCompression, nil | |||
case "gzip", "gz": | |||
return storage.Gzip, nil | |||
case "snappy": | |||
return storage.Snappy, nil | |||
case "zst": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean this? It's different with the description in comment
case "zst": | |
case "zstd": |
or maybe
case "zst": | |
case "zstd","zst": |
dumpling/tests/s3/run.sh
Outdated
# test snappy | ||
run_dumpling --s3.endpoint="http://$S3_ENDPOINT/" --compress "snappy" | ||
|
||
bin/mc cp minio/mybucket/dump-compress/s3-schema-create.sql.snappy "${HOST_DIR}/compress/s3-schema-create.sql.snappy" | ||
bin/mc cp minio/mybucket/dump-compress/s3.t-schema.sql.snappy "${HOST_DIR}/compress/s3.t-schema.sql.snappy" | ||
bin/mc cp minio/mybucket/dump-compress/s3.t.000000000.sql.snappy "${HOST_DIR}/compress/s3.t.000000000.sql.snappy" | ||
|
||
snappy -d "${HOST_DIR}/compress/s3-schema-create.sql.snappy" | ||
diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql" | ||
|
||
snappy -d "${HOST_DIR}/compress/s3.t-schema.sql.snappy" | ||
diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql" | ||
|
||
snappy -d "${HOST_DIR}/compress/s3.t.000000000.sql.snappy" | ||
diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql" | ||
|
||
rm "${HOST_DIR}/compress/s3-schema-create.sql" | ||
rm "${HOST_DIR}/compress/s3.t-schema.sql" | ||
rm "${HOST_DIR}/compress/s3.t.000000000.sql" | ||
|
||
# test zstd | ||
run_dumpling --s3.endpoint="http://$S3_ENDPOINT/" --compress "zst" | ||
|
||
bin/mc cp minio/mybucket/dump-compress/s3-schema-create.sql.zst "${HOST_DIR}/compress/s3-schema-create.sql.zst" | ||
bin/mc cp minio/mybucket/dump-compress/s3.t-schema.sql.zst "${HOST_DIR}/compress/s3.t-schema.sql.zst" | ||
bin/mc cp minio/mybucket/dump-compress/s3.t.000000000.sql.zst "${HOST_DIR}/compress/s3.t.000000000.sql.zst" | ||
|
||
zstd "${HOST_DIR}/compress/s3-schema-create.sql.zst" -d | ||
diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql" | ||
|
||
zstd "${HOST_DIR}/compress/s3.t-schema.sql.zst" -d | ||
diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql" | ||
|
||
zstd "${HOST_DIR}/compress/s3.t.000000000.sql.zst" -d | ||
diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge these three parts in a for loop?
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! LGTM
/merge |
@lance6716: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
will review later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
@@ -15,3 +15,11 @@ chmod a+x bin/minio | |||
|
|||
wget https://dl.minio.io/client/mc/release/linux-amd64/mc -O bin/mc | |||
chmod a+x bin/mc | |||
|
|||
go get github.com/ma6174/snappy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go get github.com/ma6174/snappy |
only need go install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error encountered in CI integration test
https://github.com/pingcap/tidb/actions/runs/3444134903/jobs/5746413416#step:6:7138
i think maybe should add back go get github.com/ma6174/snappy
?
dumpling/tests/s3/run.sh
Outdated
|
||
case $compressType in | ||
"gzip") | ||
gzip "${HOST_DIR}/compress/s3-schema-create.sql.gz" -d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we can assign gzip, snappy, zst to $binary
, and also assign $suffix
, then use
${binary} "${HOST_DIR}/compress/s3-schema-create.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql"
${binary} "${HOST_DIR}/compress/s3.t-schema.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql"
${binary} "${HOST_DIR}/compress/s3.t.000000000.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified
/run-all-tests |
3 similar comments
/run-all-tests |
/run-all-tests |
/run-all-tests |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 5ba6b50
|
TiDB MergeCI notify🔴 Bad News! New failing [3] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #38514
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.